<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS_浮动_依次贴边练习</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .outer{
            height: 440px;
            width: 940px;
            padding: 10px;
            margin: 10px auto;
            border: 2px solid #000;
        }
        .outer div{
            float: left;
        }
        .outer .box1{
            width: 300px;
            height: 260px;
            background: #f377a0;
        }
        .outer .box2{
            width: 240px;
            height: 260px;
            background: #77c7f6;
        }
        .outer .box3{
            width: 200px;
            height: 130px;
            background: #fef292;
        }
        .outer .box4{
            width: 200px;
            height: 130px;
            background: #84be92;
        }
        .outer .box5{
            width: 200px;
            height: 130px;
            background: #84be92;
        }
        .outer .box6{
            width: 200px;
            height: 130px;
            background: #fef292;
        }
        .outer .box7{
            width: 300px;
            height: 180px;
            background: #77c7f6;
        }
        .outer .box8{
            width: 160px;
            height: 180px;
            background: #dba5ff;
        }
        .outer .box9{
            width: 160px;
            height: 180px;
            background: #adf095;
        }
        .outer .box10{
            width: 160px;
            height: 180px;
            background: #dba5ff;
        }
        .outer .box11{
            width: 160px;
            height: 180px;
            background: #adf095;
        }
    </style>
</head>
<body>
    <div class="outer">
        <div class="box1">1</div>
        <div class="box2">2</div>
        <div class="box3">3</div>
        <div class="box4">4</div>
        <div class="box5">5</div>
        <div class="box6">6</div>
        <div class="box7">7</div>
        <div class="box8">8</div>
        <div class="box9">9</div>
        <div class="box10">10</div>
        <div class="box11">11</div>
    </div>
</body>
</html>